package com.bestvike.stone.spring.quartz;

import com.bestvike.stone.spring.quartz.core.JobFactoryCustomizer;
import org.quartz.core.QuartzScheduler;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created by 许崇雷 on 2018-08-27.
 */
@Configuration
@ConditionalOnClass(QuartzScheduler.class)
public class QuartzAutoConfiguration {
    @Bean
    @ConditionalOnMissingBean
    JobFactoryCustomizer jobFactoryCustomizer() {
        return new JobFactoryCustomizer();
    }
}
